<?php

include_once("../config.php");
$uid = $_GET['uid'];
//$id = $_GET['id'];
$uid = str_ireplace($search, '', $uid);
$id=intval($_GET['id']);

$sql = "select status from wenti where id=$id";
$requ = mysqli_query($con,$sql);
$rs = mysqli_fetch_array($requ);
if($rs['status']!=0&&$rs['status']!=1){
	$result='{"status":"-1","msg":"此单状态已改变，无法撤回。"}';
	die($result);
}

$sql = "update wenti set status=9 where uid='$uid' and id=$id";
mysqli_query($con,$sql);
if(mysqli_affected_rows($con)){
	$result='{"status":"1","msg":"ok"}';
}else{
	$result='{"status":"0","msg":"失败，请重试"}';
}
die($result);









